MuleSoft Accelerator for Salesforce Commerce Cloud
SAP Custom BAPI setup guide - Inventory
The following provides guidance on how to use the custom BAPI code (ZBAPIFM\_MATERIAL\_GET\_DATA
) for your SAP instance.
Important: You must complete the following instructions before proceeding to Use case 2 - Inventory.
BAPI custom objects
You must create the following ABAP objects in order to use this custom BAPI, which are described below.
Data elements:
ZBAPI_MATERIALDTE_DATE
ZBAPI_MATERIALDTE_TIME
Structures
ZBAPI_MATERIALSTR_RNG_DATES
ZBAPI_MATERIALSTR_RNG_TIME
ZBAPISTR_MATERIAL_DATA_IN
ZBAPISTR_INVENTORY_DATA_IN
ZBAPISTR_MATERIAL_DATA_OUT
ZBAPISTR_INVENTORY_DATA_OUT
Table types:
ZBAPITTY_MATERIAL_DATA_OUT
ZBAPITTY_INVENTORY_DATA_OUT
ZBAPI_MATERIALTTY_RNG_DATES
ZBAPI_MATERIALTTY_RNG_TIME
Class/interface: (optional, needed to handle exceptions)
ZCL_EXCEPTION_HELPER
Function group:
ZBAPIFGR_MATERIAL
Data elements
Object | How to create |
---|---|
ZBAPI_MATERIALDTE_DATE | |
ZBAPI_MATERIALDTE_TIME |
Structures
Object | How to create |
---|---|
ZBAPI_MATERIALSTR_RNG_DATES | |
ZBAPI_MATERIALSTR_RNG_TIME | |
ZBAPISTR_MATERIAL_DATA_IN | |
ZBAPISTR_INVENTORY_DATA_IN | |
ZBAPISTR_MATERIAL_DATA_OUT | |
ZBAPISTR_INVENTORY_DATA_OUT |
Table types
Object | How to create |
---|---|
ZBAPITTY_MATERIAL_DATA_OUT | |
ZBAPITTY_INVENTORY_DATA_OUT | |
ZBAPI_MATERIALTTY_RNG_DATES | |
ZBAPI_MATERIALTTY_RNG_TIME |
Class/Interface
ZCL_EXCEPTION_HELPER
This class is used to handle the BAPI messages. In this case, the method used is S_SYST_TO_RETURN
:
Creating a function group
The following describes how to create a function group named ZBAPIFGR_MATERIAL
:
- Create function module
ZBAPIFM_MATERIAL_GET_DATA
, using "Remote-enable module" as processing type: - Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from
ZBAPIFM_MATERIAL_GET_DATA.txt
, and then activate it. - Create
ZBAPI_MATERIAL_MSG
message class with the following messages: